/**
 * Created by lifan on 2015/11/16.
 */
var http = require('http');
var querystring = require('querystring');

var contents = querystring.stringify({
    name:"lifan",
    email:'lifand@yonyou.com',
    address:'haidianqu yongfenglu'
});

var options = {
    host:'127.0.0.1',
    port:8000,
    path:'/start',
    method:'POST',
    headers:{
        'Content-Type':'text/plain',
        'Content-Length':contents.length
    }

};

var request = http.request(options, function(response){
    console.log('=========服务器返回的结果========');
    response.setEncoding('utf-8');
    response.on('data', function(data){
        console.log(data);
    });
});

request.write(contents);
request.end();



